using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class UI_CurrencyBar : MonoBehaviour
{
    private TextMeshProUGUI m_TextMeshPro;
    private void Awake()
    {
        m_TextMeshPro = GetComponentInChildren<TextMeshProUGUI>();
    }

    private void Start()
    {
        PlayerManager.instance.OnCurrencyChanged += UpdateUI;
    }

    private void UpdateUI(int value)
    { 
        m_TextMeshPro.text = value.ToString();
    }

}
